﻿package fpc.layouts;
import flash.display.DisplayObjectContainer;
import fpc.utils.Maths;
import fpc.utils.Herald;

interface ILayoutable 
{
	var heraldResize(default, null):Herald<ILayoutable>;
	
	var heraldMove(default, null):Herald<ILayoutable>;
	
	function addTo(parent:DisplayObjectContainer, index:Int = Maths.INT_NULL):Void;
	
	function removeFrom(parent:DisplayObjectContainer):Void;
	
	var x(getX, setX):Float;
	
	var y(getY, setY):Float;
	
	var width(getWidth, setWidth):Float;
	
	var height(getHeight, setHeight):Float;
	
	var widthPortion(default, null):Float;
	
	var heightPortion(default, null):Float;
	
	var percentsWidth(getPercentsWidth, setPercentsWidth):Float;
	
	var percentsHeight(getPercentsHeight, setPercentsHeight):Float;
	
	var alignX(getAlignX, setAlignX):Float;
	
	var alignY(getAlignY, setAlignY):Float;
	
	var parent(default, setParent):ILayoutable;
	
	var visible(getVisible, setVisible):Bool;
	
	var alpha(getAlpha, setAlpha):Float;
}